<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>

    function Array2() {

        this.filter=function (callback) {
           var outter = [];
            for (var key in this){
                if(callback(this[key])){
                    outter.push(this[key]);
                }
            }
            return outter;
        }
    }
  var  arr=new Array2();

    arr.filter(function (item) {
        return item>2;
    })

</script>
</html>